var SERVICE_URL = "http://120.79.236.63:8888/investment";
// var SERVICE_URL = "http://127.0.0.1:8888/investment";

// 封装handlebars模板引擎
function handlebars(temIn, data, temOut) {
    // 抓取模板数据
    var theTemplateScript = $(temIn).html();
    // 编译模板
    var theTemplate = Handlebars.compile(theTemplateScript);
    // 定义数据
    var context = data;

    // 把数据传送到模板
    var theCompiledHtml = theTemplate(context);
    // 更新到模板
    $(temOut).html(theCompiledHtml);
}

//获取get带的参数
function getParameterByName(name) {
    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
        results = regex.exec(location.search);
    return results == null ? "" : decodeURIComponent(results[1]);
}


